package com.ass;

import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;

public class Searcher {
	List<MyElement> al;
	public Searcher(){
		
	}
	
	public Searcher(List<MyElement> al){
		this.al = al;
	}
	
	public MyElement find(String id){
		Iterator<MyElement> iterator = al.iterator();
		MyElement temp = null;
		while(iterator.hasNext()){
			temp = iterator.next();
			if(temp.getID().equals(id)){
				break;
			}
		}
		return temp;
	}
}
